package GUI;

import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

public class LoginPanel extends JPanel implements ActionListener {
    private JButton loginBtn;
    private Text2 frame;
    private ImageIcon image=Util.getIcon("/img/buttonLand.jpg");


    public LoginPanel(Text2 frame){
        this.frame = frame;
        this.setLayout(null);
        this.setOpaque(false);


        loginBtn = new JButton(image);
        loginBtn.setBounds(300,380,100,50);
        this.add(loginBtn);
        loginBtn.addActionListener(this);
    }

    @Override
    public void actionPerformed(ActionEvent e) {
        if(e.getSource()==loginBtn){
            frame.switchPanel("menu");
        }
    }
}
